JAVA = java

JAVAC = javac

COMP_FLAGS = -g -O

RUN_FLAGS =

DIRS = ATUC ATUR

.SUFFIXES: .class .java
.java.class:
	$(JAVAC) $(COMP_FLAGS) $<

JSRCS = ADSL.java \
	BroadBandNetTx.java \
	BroadBandNetRx.java \
	CustomerNetTx.java \
	CustomerNetRx.java
	
all: $(JSRCS:%.java=%.class) subtree

subtree:
	@if [ "x$(DIRS)" != "x" ]; then \
		set $(DIRS); \
		for x do \
		    if [ -w $$x ] ; then \
			( cd $$x ; \
			$(MAKE) ;\
			) \
		    fi ; \
		done ; \
	fi

clean:
	rm -f *.class *.tx *.rx
	@for x in $(DIRS); do \
	    if [ -w $$x ] ; then \
		( cd $$x ; \
		echo making $@ in $(ME)/$$x ; \
		$(MAKE) $@ ;\
		) \
	    fi ; \
	done

run: $(JSRCS)
	$(JAVA) $(RUN_FLAGS) ptij.ADSL.pn.ADSL
	java compData

runa: $(JSRCS)
	appletviewer ADSL.htm
	
cleanall:
	rm -f *class
	rm -rf jsdatabase
	rm -f summary.html
	
